<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta content="yes" name="apple-mobile-web-app-capable">
    <meta content="yes" name="apple-touch-fullscreen">
    <meta content="telephone=no" name="format-detection">
    <meta content="black" name="apple-mobile-web-app-status-bar-style">
    <meta name="viewport" content="width=device-width, minimum-scale=1, maximum-scale=1;user-scalable=no;">
    <title>1起购</title>
    <link rel="stylesheet" href="/statics/view/css/bootstrap.css">
    <link rel="stylesheet" href="/statics/view/css/style.css">
    <link rel="stylesheet" href="/statics/view/css/member.css">
    <link rel="stylesheet" href="/statics/view/css/order3.css">
    <script charset="utf-8" src="/statics/view/js/jquery.min.js"></script>
    <script charset="utf-8" src="/statics/view/js/global.js"></script>
    <script charset="utf-8" src="/statics/view/js/bootstrap.min.js"></script>
    <script charset="utf-8" src="/statics/view/js/template.js"></script>
    <script charset="utf-8" src="/statics/view/js/stickTop.js"></script>
    <script type='text/javascript' src="/statics/view/js/jquery.form.js"></script>
    <script type="text/javascript" src="/statics/layer.m/layer.m.js"></script>

    <style type="text/css">
        .details_con li .tb-out-of-stock{
            border: 1px dashed #bbb;
            color:#bbb;
            cursor: not-allowed;
        }
        .no-selected{
            background: #ffe8e8 none repeat scroll 0 0;
            border: 2px solid #be0106;
            margin: -1px;
        }
        /*动态返回顶部*/
        .fixed_box { position: fixed; bottom: .5rem; right: .5rem;display: none; }
    </style>
</head>
<body style="background-color:#fff">

<div class="maincontainer">
    <div class="container wx_wrap mini-innner">
        <div class="row">
            <div class="fanhui_cou">
                <div class="fanhui_1"></div>
                <div class="fanhui_ding">顶部</div>
            </div>
            <header class="header">
                <div class="fix_nav">
                    <div style="max-width:768px;margin:0 auto;background:#db3652;position: relative;">
                        <a class="nav-left back-icon" href="javascript:history.back();">返回</a>

                        <div class="tit">收货人与地址</div>
                        <a class="nav-right icon-home" href="/dbs/index.html">首页</a>
                    </div>
                </div>
            </header>
        </div>
        <div class="row">
            <div class="mem_sh_cou">
            [#list receiverList as receiver]
                <div class="mem_sh_num">
                    <div class="mem_sh_top_cou">
                        <div class="mem_sh_top">
                            <div class="mem_sh_lef fl">${receiver.consignee}</div>
                            <div class="mem_sh_cou_cen fl">${receiver.phone}</div>
                        </div>
                        <div class="mem_sh_dz"> ${receiver.areaName}${receiver.address}</div>
                    </div>

                    <div class="mem_sh_bot">
                        <div class="mem_sh_bot_lef fl set_default" address_id="${receiver.id}">

                            [#if receiver.isDefault]
                                <div class="mem_sh_bot_lef_img fl mem_sh_bot_lef_img_2"></div>
                            [#else]
                                <div class="mem_sh_bot_lef_img fl mem_sh_bot_lef_img_1"></div>
                            [/#if]
                            <div class="mem_sh_bot_lef_tit">默认地址</div>
                        </div>

                        <div class="member_sh_bot_rig fr">
                            <a href="javascript:void(0);" class="buyBtn2" address_id="${receiver.id}">
                                <div class="member_right_r fr">
                                    <span class="mem_sh_bot_rig_tit fr">删除</span>
                                    <div class="mem_sh_bot_rig_img fr"><img src="/statics/view/images/member_del.png"></div>
                                </div>
                            </a>

                            <a href="javascript:void(0);" class="buyBtn" address_id="${receiver.id}">
                                <div class="member_right_l fr">
                                    <span class="mem_sh_bot_tit fr">编辑</span>
                                    <div class="mem_sh_bot_img fr"><img src="/statics/view/images/member_xiu.png"></div>
                                </div>
                            </a>
                        </div>
                    </div>
                </div>
                <div style="height:15px;background:#f0f2f5;"></div>
            [/#list]


                <div class="wap_page" style="text-align:center;"></div>
                <a class="item item_new"  data-title="新增地址" href="/member/receiver/add?tag=${tag}">
                    <div style="width:80%;margin:0 auto;height:40px;line-height:40px;background:#f15353;text-align: center;color: #fff;font-size: 16px;">
                        <span style="font-size:20px;">+</span>
                        <span style="line-height:30px;">新建地址</span>
                    </div>
                </a>
            </div>
        </div>
    </div>
    <div class="clear"></div>
</div>
<script type="text/javascript">
    $(function(){
        $('.set_default').click(function() {
            var addressId = $(this).parent().attr('address_id');
            showPageLoadingMsg('加载中...');
            /**
             showPageLoadingMsg('设置默认收货地址中...');
             $.ajax({
	    		"url":contextPath + "/legendshop-UI2/defaultaddress/"+ addressId ,
	    		type:'post',
	    		async : true, //默认为true 异步
	    		error: function(jqXHR, textStatus, errorThrown) {
	    		},
	    		success:function(result){
	    			backspace();
	    		}
	    	});**/


        });

        $('.buyBtn').click(function(){
            var addressId = $(this).attr('address_id');
            var tag="";
            location.href ="/member/receiver/edit?id="+addressId+"&tag="+tag;
        })

    });

    /** 编辑收货地址 **/
    function addressEdit(addrId,tag){
        location.href ="/member/receiver/edit?id="+addrId+"&tag="+tag;
    }
</script>
</body>
</html>

